<include file="Public/min-header"/>
<div class="wrapper">
  <include file="Public/breadcrumb"/>
  <!-- Main content -->
  <section class="content">
    <div class="container-fluid">
      <div class="panel panel-default">
        <div class="panel-heading">
          <h3 class="panel-title"><i class="fa fa-list"></i> 商品尺寸列表</h3>
        </div>
        <div class="panel-body">    
		<div class="navbar navbar-default">
            <div class="row navbar-form">
               <if condition="$pid neq ''">
                <button type="submit" onclick="location.href='{:U('Admin/goods/goodsTemplate')}'"  class="btn btn-primary pull-right" style="margin-left: 10px;"><i class="fa fa-plus"></i>返回列表</button>
               </if>
               
               <if condition="$pid neq ''">
                	<button type="submit" onclick="location.href='{:U('Admin/goods/addEditGoodsTem',array('pid'=>$pid))}'"  class="btn btn-primary pull-right"><i class="fa fa-plus"></i>新增尺码信息</button>
               <else/>
                	<button type="submit" onclick="location.href='{:U('Admin/goods/addEditGoodsTem')}'"  class="btn btn-primary pull-right"><i class="fa fa-plus"></i>新增模板</button>
               </if>
            </div>
          </div>
                        
          <div id="ajax_return"> 
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <th class="sorting text-center" width="100">ID</th>  
                                <if condition="$pid eq ''">                      
                                <th class="sorting text-center" width="200">分类</th>                       </if>
                                
                                <th class="sorting text-center">模板名称</th>   
                                <th class="sorting text-center" width="200">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="goodsTemList" id="list">
                                <tr>
                                    <td class="text-center">{$list.id}</td>
                                <if condition="$pid eq ''">       
                                    <td class="text-center">{$tem_type[$list[cat_id]]}</td>
									</if>
                                    <td class="text-center">{$list.name}
                                   		<if condition="$list[cat_id] eq 2">
                                   			<a href="{$list.original_img}" target="_blank"><img src="/Public/images/image_icon.jpg" style="vertical-align: middle;width: 20px;margin:0 5px;" ></a>
										</if>
                                    </td>
                                    <td class="text-right">  
                                           	
                                           	<if condition="$pid eq ''">
                                            	<if condition="$list[cat_id] neq 2"><a  data-toggle="tooltip" title="添加" class="btn btn-info send_user" href="{:U('Goods/goodsTemplate',array('pid'=>$list[id]))}" ><i class="fa fa-send-o"></i></a>       </if>         
										</if>
                                       
                                           	<if condition="$pid eq ''">
                                        <a href="{:U('Admin/goods/addEditGoodsTem',array('id'=>$list['id']))}" data-toggle="tooltip" title="编辑" class="btn btn-primary" data-original-title="编辑"><i class="fa fa-pencil"></i></a>
                                        <a href="javascript:del_fun('{:U('Goods/delGoodsTem',array('id'=>$list['id']))}');" id="button-delete6" data-toggle="tooltip" title="删除" class="btn btn-danger" data-original-title="删除"><i class="fa fa-trash-o"></i></a>
                                        <else/>
                                        
                                        <a href="{:U('Admin/goods/addEditGoodsTem',array('id'=>$list['id'],'pid'=>$pid))}" data-toggle="tooltip" title="编辑" class="btn btn-primary" data-original-title="编辑"><i class="fa fa-pencil"></i></a>
                                        <a href="javascript:del_fun('{:U('Goods/delGoodsTem',array('id'=>$list['id'],'pid'=>$pid))}');" id="button-delete6" data-toggle="tooltip" title="删除" class="btn btn-danger" data-original-title="删除"><i class="fa fa-trash-o"></i></a>
										</if>
                                    </td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                    </div>
                
                <div class="row">
                    <div class="col-sm-6 text-left"></div>
                    <div class="col-sm-6 text-right">{$show}</div>
                </div>
          
          </div>
        </div>
      </div>
    </div>
    <!-- /.row --> 
  </section>
  <!-- /.content --> 
</div>
<!-- /.content-wrapper --> 
</body>
</html>